/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       garrison_button.h

	$Header: /game/garrison_button.h $

	$NoKeywords: $

 ************************************************************************/
#ifndef GARRISON_BUTTON_H_INCLUDED
#define GARRISON_BUTTON_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bitmap_layer_window_ptr.h"
#include "creature_array_window_ptr.h"
#include "game_window.h"
#include "handler.h"

class t_bitmap_layer;
// --------------------------------------------------------------------
// button-like window which allows player to drag entire army from one
// creature array window to another
// --------------------------------------------------------------------

class t_garrison_button : public t_window
{
public:
	typedef t_handler_1<t_garrison_button*> t_select_handler;

	t_garrison_button( t_bitmap_layer const* bitmap, t_screen_point point, 
		               t_creature_array_window* army_window, 
					   t_select_handler select_handler, t_window* parent );

	virtual bool accept_drag( t_drag_object* drag, t_mouse_event const& event);
	virtual void drag_event( t_mouse_event const& event );
	void         highlight( bool arg );
	virtual void left_button_down( t_mouse_event const& event );
	virtual void left_button_up( t_mouse_event const& event );
	void         select( bool arg );
protected:
	virtual void on_close();

	t_bitmap_window_ptr			m_icon;
	t_creature_array_window_ptr m_army_window;
	t_select_handler            m_select_handler;
};

#endif // GARRISON_BUTTON_H_INCLUDED